import serve from "@/service/index.ts";
interface TaskData {
  address: string;
  project: string;
  createAt: string;
  content: string;
  id?: string;
}
// 添加
export const addTask = (data: TaskData) => {
  return serve.post({
    url: "/standard/task/add",
    data,
  });
};
// 修改
export const updateTask = (id: string, data: TaskData) => {
  return serve.post({
    url: "/standard/task/update",
    data: { id, ...data },
  });
};
// 删除
export const deleteTask = (data: { id: string }) => {
  return serve.post({
    url: "/standard/task/delete",
    data,
  });
};
// 查看
export const getTask = (data: any) => {
  return serve.get({
    url: "/standard/task/query",
    data,
  });
};
